// module: iconfont
const state = {  // 模块下的state
  hasLoaded: false,
};

const getters = {  // 模块下的getters
  needLoad: state => {
    return !state.hasLoaded;
  }
};

const mutations = {  // 模块下的mutation
  ICONS_LOADED(state) {
    state.hasLoaded = true;
  }
};

const actions = {  // 模块下的 actions
  hasSetIconFontScriptTag({state, commit}) {
    commit('ICONS_LOADED')
  }
};

export default {
  namespaced: true,  // 启用命名空间
  state,
  getters,
  mutations,
  actions
}
